package com.example.epidemic_assistant.bean;

import com.example.epidemic_assistant.util.StringConverter;

import org.greenrobot.greendao.annotation.Convert;
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

import java.util.ArrayList;
import java.util.List;

/**
 * 用户数据实体类
 */
@Entity
public class UserBean {
    @Id(autoincrement = true)
    private Long id;
    private boolean isAdmin;             //是否管理员
    private String userName;             //登录账号
    private String userPass;             //登录密码
    private String name;                 //用户名
    private String userPhoto;            //用户名
    private String age;                  //年龄
    private String sex;                  //性别
    private String idCard;               //身份证号码
    private String familyAddress;        //家庭地址
    private String healthImgPath;        //疫苗接种图片地址
    private String healthMaImgPath;      //健康码图片地址
    private boolean isMaintain;          //是否需要维修
    @Convert(converter = StringConverter.class, columnType = String.class)
    private List<String> places;         //去过的地方
    @Convert(converter = StringConverter.class, columnType = String.class)
    private List<String> people;         //接触过的人
    @Convert(converter = StringConverter.class, columnType = String.class)
    private List<String> temperature;    //记录的体温
    @Convert(converter = StringConverter.class, columnType = String.class)
    private List<String> temperatureDate;//记录的体温日期
    private int day;                     //隔离天数
    private String temperatureThreshold = "38"; //温度阈值
    private int roomId;                  //隔离人员房间号  100:注销

    @Generated(hash = 1531773840)
    public UserBean(Long id, boolean isAdmin, String userName, String userPass, String name,
            String userPhoto, String age, String sex, String idCard, String familyAddress,
            String healthImgPath, String healthMaImgPath, boolean isMaintain,
            List<String> places, List<String> people, List<String> temperature,
            List<String> temperatureDate, int day, String temperatureThreshold, int roomId) {
        this.id = id;
        this.isAdmin = isAdmin;
        this.userName = userName;
        this.userPass = userPass;
        this.name = name;
        this.userPhoto = userPhoto;
        this.age = age;
        this.sex = sex;
        this.idCard = idCard;
        this.familyAddress = familyAddress;
        this.healthImgPath = healthImgPath;
        this.healthMaImgPath = healthMaImgPath;
        this.isMaintain = isMaintain;
        this.places = places;
        this.people = people;
        this.temperature = temperature;
        this.temperatureDate = temperatureDate;
        this.day = day;
        this.temperatureThreshold = temperatureThreshold;
        this.roomId = roomId;
    }

    @Generated(hash = 1203313951)
    public UserBean() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public boolean isAdmin() {
        return isAdmin;
    }

    public void setAdmin(boolean admin) {
        isAdmin = admin;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getUserPass() {
        return userPass;
    }

    public void setUserPass(String userPass) {
        this.userPass = userPass;
    }

    public String getAge() {
        return age;
    }

    public void setAge(String age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "UserBean{" +
                "id=" + id +
                ", isAdmin=" + isAdmin +
                ", userName='" + userName + '\'' +
                ", userPass='" + userPass + '\'' +
                ", name='" + name + '\'' +
                ", age='" + age + '\'' +
                ", sex='" + sex + '\'' +
                ", idCard='" + idCard + '\'' +
                ", familyAddress='" + familyAddress + '\'' +
                ", places=" + places +
                ", people=" + people +
                ", temperature=" + temperature +
                ", day=" + day +
                ", roomId=" + roomId +
                '}';
    }

    public boolean getIsAdmin() {
        return this.isAdmin;
    }

    public void setIsAdmin(boolean isAdmin) {
        this.isAdmin = isAdmin;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<String> getPlaces() {
        return this.places;
    }

    public void setPlaces(List<String> places) {
        this.places = places;
    }

    public List<String> getPeople() {
        return this.people;
    }

    public void setPeople(List<String> people) {
        this.people = people;
    }

    public List<String> getTemperature() {
        return this.temperature;
    }

    public void setTemperature(List<String> temperature) {
        this.temperature = temperature;
    }

    public int getDay() {
        return this.day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public int getRoomId() {
        return this.roomId;
    }

    public void setRoomId(int roomId) {
        this.roomId = roomId;
    }

    public String getIdCard() {
        return this.idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getFamilyAddress() {
        return this.familyAddress;
    }

    public void setFamilyAddress(String familyAddress) {
        this.familyAddress = familyAddress;
    }

    public String getHealthImgPath() {
        return this.healthImgPath;
    }

    public void setHealthImgPath(String healthImgPath) {
        this.healthImgPath = healthImgPath;
    }

    public boolean getIsMaintain() {
        return this.isMaintain;
    }

    public void setIsMaintain(boolean isMaintain) {
        this.isMaintain = isMaintain;
    }

    public String getUserPhoto() {
        return this.userPhoto;
    }

    public void setUserPhoto(String userPhoto) {
        this.userPhoto = userPhoto;
    }

    public String getHealthMaImgPath() {
        return this.healthMaImgPath;
    }

    public void setHealthMaImgPath(String healthMaImgPath) {
        this.healthMaImgPath = healthMaImgPath;
    }

    public List<String> getTemperatureDate() {
        return this.temperatureDate;
    }

    public void setTemperatureDate(List<String> temperatureDate) {
        this.temperatureDate = temperatureDate;
    }

    public String getTemperatureThreshold() {
        return this.temperatureThreshold;
    }

    public void setTemperatureThreshold(String temperatureThreshold) {
        this.temperatureThreshold = temperatureThreshold;
    }
}


